import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useSidebarStore = defineStore('sidebar', () => {
    // 使用 ref 定义响应式状态
    const selectedKeys = ref<string[]>([])

    // 更新选中状态
    const setSelectedKeys = (keys: string[]) => {
        selectedKeys.value = keys
    }

    return {
        selectedKeys,
        setSelectedKeys
    }
},)